﻿using SBlogCore.WebAdminApplication.SysUserManager.Dto;
using SBlogCore.Entitys.SysUserManager;

namespace SBlogCore.WebAdminApplication.SysUserManager.IServices
{
    public interface ISysUserInfoService
    {
        /// <summary>
        /// 获取用户列表
        /// </summary>
        /// <param name="inPut"></param>
        /// <returns></returns>
        Task<PageList<SysUserInfo>> GetUserList(SysUserInfoQueryInPut inPut);
        /// <summary>
        /// 通过ID获取用户信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<SysUserInfo> GetUserInfo(long id);
        /// <summary>
        /// 获取当前登录用户的信息
        /// </summary>
        /// <returns></returns>
        Task<SysUserInfo> GetLoginUserInfo();
        /// <summary>
        /// 用过账号获取用户信息
        /// </summary>
        /// <param name="account"></param>
        /// <returns></returns>

        Task<SysUserInfo> GetUserInfoByAccount(string account);
        /// <summary>
        /// 创建用户信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<long> AddUserInfo(SysUserInfoInput input);
        /// <summary>
        /// 修改用户信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task UpdateUserInfo(SysUserInfoEditInput input);

        /// <summary>
        /// 账号是否已存在
        /// </summary>
        /// <param name="account"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<bool> AnyAccount(string account, long? id = null);

        /// <summary>
        /// 邮箱是否已存在
        /// </summary>
        /// <param name="email"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<bool> AnyEmail(string email, long? id = null);
        /// <summary>
        /// 修改用户电话
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="photoId"></param>
        /// <returns></returns>
        Task UpdateUserPhoto(long userId, long photoId);
        /// <summary>
        /// 删除用户信息
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task DeleteUserInfo(long userId);
        /// <summary>
        /// 修改用户面
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="passWord"></param>
        /// <returns></returns>
        Task UpdateUserPassWord(long userId, string passWord);

        Task<SysUserInfo> GetUserInfoById(long id);
    }
}
